<template>
  <a-modal
    
    centered
    :footer="null"
    :visible="p_modal2Visible"
    :maskClosable="false"
    :closable="false"
    :width='200'
    :bodyStyle='bodystyle'
  >
    <a-spin :tip="p_title"></a-spin>
  </a-modal>
</template>
<script>
export default {
  name: 'CostomProgress',
  props: {
    title: {
      type: String,
      default: ''
    },
    modal2Visible: {
      type: Boolean,
      default: false
    },
    percent: {
      type: Number,
      default: 0
    }
  },
  data() {
    // 是否显示标题
    return {
      bodystyle: {
        'text-align': 'center'
      },
      p_modal2Visible: false,
      p_percent: 0,
      p_title: ''
    };
  },
  watch: {
    title: function(newVal) {
      this.p_title = newVal;
    },
    modal2Visible: function(newVal) {
      this.p_modal2Visible = newVal;
    },
    percent: function(newVal) {
      this.p_percent = newVal;
    }
  }
};
</script>

